﻿@model CoreData.Merchant_Notify
@{ 
    ViewBag.Title = "Add or Update Merchant Notify";
}
<div class="row-fluid">
    <div class="span12">
          <div class="head">
            <div class="isw-documents">
            </div>
            <h1>
                Detail</h1>
                <ul class="buttons">
                    <li><a href="#" class="isw-settings"></a>
                        <ul class="dd-list" style="display: none;">
                         @if (Helper.SessionManagement.Value("pvalue").Contains("C"))
                         {
                            <li><a href="@Url.Action("AddOrUpdate", "MerchantNotifyManagement")"><span class="isw-plus"></span>Add new</a></li>
                         }
                         </ul>
                    </li>
            </ul>
            <div class="clear">
            </div>       
                  
        </div>
        <div class="block-fluid tabs">
            <ul>
                <li><a href="#tabs-1">Content</a></li>
            
            </ul>
            @using (Ajax.BeginForm("AddOrUpdate", "MerchantNotifyManagement", new AjaxOptions { OnSuccess = "Success", HttpMethod = "Post" }, new { enctype = "multipart/form-data", @id = "validation" }))
            {
                  <div class="warning-area">
                </div>
            
              
                <div id="tabs-1">
                    @Html.HiddenFor(model => model.ID)
                    <div class="row-form">
                        <div class="span2">
                            Title:</div>
                        <div class="span9">
                            @Html.TextBoxFor(x => x.Title, new { @class = "validate[required]" })</div>
                        <div class="clear">
                        </div>
                    </div>
                   <div class="row-form">
                        <div class="span2">
                           Merchants:</div>
                        <div class="span9">
                           @Html.DropDownListFor(x => x.MerchantIDExt, Model.ListMerchantExt, new Dictionary<string, object> { { "data-placeholder", "    " }, { "class", "chosen-select" }, { "style", "width:350px;height:500px" }, { "multiple", "true" } })</div>
                        <div class="clear">
                        </div>
                    </div>
                  
                    <div class="row-form">
                        <div class="span2">
                            Content</div>
                        <div class="span9">
                            @Html.TextAreaFor(x => x.Content, new { @cols = "10", @rows = "10" })</div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Status</div>
                        <div class="span9">
                           <span id="statussend">
                            @if (Model.Status == 1)
                            {
                                @:It had sent
                            }
                            else
                            {
                                @:Not sent 
                            }
                           </span>
                           
                         </div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="row-form">
                        <div class="span2">
                            Send</div>
                        <div class="span9">
                           @if (!Model.Active)
                           {
                               <div>@Html.CheckBoxFor(x => x.Active)</div>
                           }
                           else
                           { }

                           </div>
                        <div class="clear">
                        </div>
                    </div>
                 
                
            
                           @if (Helper.SessionManagement.Value("pvalue").Contains("C") || Helper.SessionManagement.Value("pvalue").Contains("U"))
                           {
                <div class="row-form">
                    <div class="span2">
                    </div>
                    <div class="span9">
                        <input type="submit" class="btn btn-info span3" value="Update" /></div>
                    <div class="clear">
                    </div>
                </div>
                            }
            
  
              </div>
              }
    </div>
</div>
